home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 352_01.zip / STRPPFIX.CPP < prev    next >
C/C++ Source or Header  |  1993-04-10  |  380b  |  16 lines

  1. // STRPPFIX.CPP - contains String::String(int) = fixed length constructor
  2. //
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include "wtwg.h"
  6. #include "dblib.h"
  7.  
  8. String::String (int nb)
  9.     {
  10.     char *ptr = (char *)wmalloc ( nb+1, "String" );
  11.     memset ( ptr, ' ', nb );
  12.     ptr[nb] = 0;
  13.     s = ptr;
  14.     n = nb;
  15.     }
  16. //--------------- end of String::String(int) ---------------------------